package tal.gateway.gatewaydemo.config;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RouteConf {

    @Bean
    public RouteLocator routeLocator1(RouteLocatorBuilder builder){
        RouteLocatorBuilder.Builder routes = builder.routes();
        routes.route("rout3", r -> r.path("/tal/c").uri("localhost:8081/tal/c") ).build();
        return routes.build();
    }
}
